Passing variables into arrow function